<#assign module="insurance"/>

<@override name="header">
</@override>

<@override name="body">

<div class="row">
    <div class="col-xs-2">
        <div class="btn-group">
            <a class="btn btn-default" href="${ctx}/insurances/details">保费明细</a>
            <a class="btn btn-default active" href="${ctx}/insurances/list">投保记录</a>
        </div>
    </div>
    <div class="col-xs-10">
        <label>
            <span class="label label-success">可提现金额：${app["balance"]?if_exists}元</span>
            &nbsp;&nbsp;
            <span class="label label-info">不可提现金额：${app["nodraw"]?if_exists}元</span>
            &nbsp;&nbsp;
            <span class="label label-warning">冻结金额：${app["frozen"]?if_exists}元</span>
        </label>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <a href="${ctx}/insurances/charge" class="btn btn-primary">立即充值</a>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <a href="http://help.easymi.com/443.html" target="_blank" data-toggle="tooltip" data-placement="top" title="代驾险说明"><span class="glyphicon glyphicon-question-sign"></span>&nbsp;代驾险说明</a>
    </div>
</div>

<div class="row margin-top">
    <div class="col-xs-12">
        <div class="panel panel-primary">
            <div class="table-responsive">
                <table class="table table-hover table-striped">
                    <thead>
                    <tr style="font-size:14px;">
                        <th>订单号</th>
                        <th>保单号</th>
                        <th>投保编号</th>
                        <th>投保时间</th>
                        <th>生效时间</th>
                        <th>完成时间</th>
                    </tr>
                    </thead>
                    <#if rows??>
                        <tbody>
                            <#list rows as item>
                            <tr>
                                <td><a href="${ctx}/order/detail/${item["orderId"]?if_exists}">${item["orderNo"]?if_exists}</a></td>
                                <td><#if item["pinanNo"] != 'null' >${item["pinanNo"]?if_exists}<#else>-</#if></td>
                                <td>${item["insNo"]?if_exists}</td>
                                <td>${item["created"]?if_exists}</td>
                                <td><#if item["grantTime"] != 'null' >${item["grantTime"]?if_exists}<#else>-</#if></td>
                                <td><#if item["completeTime"] != 'null' >${item["completeTime"]?if_exists}<#else>-</#if></td>
                            </tr>
                            </#list>
                        </tbody>
                    </#if>
                </table>

                <#if total??>
                    <ul class="pagination pull-right pagination-sm">
                        <li><a>共 ${total} 条数据</a></li>
                        <@pg.pager items=total?number maxPageItems=20 export="currentPageNumber=pageNumber" url="${ctx}/insurances/list">
                            <@pg.index>
                                <@pg.first>
                                    <li><a href="${pageUrl}">&laquo;</a></li>
                                </@pg.first>
                                <@pg.prev>
                                    <li><a href="${pageUrl}">&lsaquo;</a></li>
                                </@pg.prev>
                                <@pg.pages>
                                    <#if  currentPageNumber == pageNumber >
                                        <li class="active"><a href="#">${pageNumber}</a></li>
                                    <#else>
                                        <li><a href="${pageUrl}">${pageNumber}</a></li>
                                    </#if>
                                </@pg.pages>
                                <@pg.next>
                                    <li><a href="${pageUrl}">&rsaquo;</a></li>
                                </@pg.next>
                                <@pg.last>
                                    <li><a href="${pageUrl}">&raquo;</a></li>
                                </@pg.last>
                            </@pg.index>
                        </@pg.pager>
                    </ul>
                </#if>
            </div>
        </div>
    </div>
</div>

</@override>

<@override name="footer">
<script type="text/javascript">
    $(function () {
        $('[data-toggle="tooltip"]').tooltip()
    });
</script>
</@override>

<@extends name="../layout.ftl"/>